package Frames;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class NToastF extends Frame {
    public NToastF() {
        super();
        Frame frame = new Frame("膳食营养管理系统");
        frame.setVisible(true);
        frame.setSize(400, 250);
        frame.setBackground(Color.WHITE);
        frame.setLocation(1050, 600);
        frame.setResizable(false);
        frame.setLayout(null);
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                frame.dispose();
            }
        });
        Label wel = new Label("请输入正确的数值！", Label.CENTER);
        wel.setBounds(50,30,300,100);
        wel.setFont(new Font("", Font.BOLD,21));
        frame.add(wel);
        Button enter=new Button("完成");
        enter.setBounds(150,140,100,50);
        enter.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                frame.dispose();
            }
        });
        frame.add(enter);
    }
}
